-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Oneshot] Oneshot Refactor #1041
base: main
Are you sure you want to change the base?
Conversation
👋 Hi! Thank you for contributing to llm-compressor. Please add the ready label when the PR is ready for review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems like we're introducing more abstractions, not fewer, when separating out the oneshot entrpoint and I'm not sure these are necessary.
we also seem to be repeating a lot of code everywhere.
@dsikka Thanks for looking at the pr early. Yes thats the next to do before the full review. One ready i will ping you! |
…gs and popualte model_args to avoid collision
@@ -75,7 +75,6 @@ def test_oneshot_application(self): | |||
model=self.model, | |||
dataset=self.dataset, | |||
output_dir=self.output, | |||
overwrite_output_dir=True, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only used in HF training args
https://github.com/huggingface/transformers/blob/main/src/transformers/training_args.py#L819
SUMMARY:
Edit oneshot pathway to use only the necessary code.
Problem:
Oneshot uses a pathway that is shared in other entrypoints, eg. train.
Oneshot doesnt train, so do not need use code that trains, as an example of redundant code. Remove other parts of the code and refactor
Design
Changes:
TEST PLAN:
Pass existing passing tests
Pass all finetune tests merging transformer main for HFQuantizer support
Verified new pathway has the same scales for the int8 w8a8 dynamic per token values for Meta-Llama-3-8B-Instruct